 package com.bmps.springcloud.insuredmicroservice.model.accept.resquest;

 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;

 import javax.validation.Valid;
 import javax.validation.constraints.NotBlank;
 import java.io.Serializable;

 /**
  *  @author lyw
  *  @date 2019/07/24
  */
 public class BnfInfoModel implements Serializable {

     @NotBlank(message="bnfType节点不能为空!")
	 private String bnfType;

     @Valid
	 private BeneficiariesModel beneficiaries;

     public String getBnfType() {
         return bnfType;
     }

     public void setBnfType(String bnfType) {
         this.bnfType = bnfType;
     }

     public BeneficiariesModel getBeneficiaries() {
         return beneficiaries;
     }

     public void setBeneficiaries(BeneficiariesModel beneficiaries) {
         this.beneficiaries = beneficiaries;
     }

     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }

         if (o == null || getClass() != o.getClass()) {
             return false;
         }

         BnfInfoModel that = (BnfInfoModel) o;

         return new EqualsBuilder()
                 .append(bnfType, that.bnfType)
                 .append(beneficiaries, that.beneficiaries)
                 .isEquals();
     }

     @Override
     public int hashCode() {
         return new HashCodeBuilder(17, 37)
                 .append(bnfType)
                 .append(beneficiaries)
                 .toHashCode();
     }

     @Override
     public String toString() {
         return "BnfInfoModel{" +
                 "bnfType='" + bnfType + '\'' +
                 ", beneficiaries=" + beneficiaries +
                 '}';
     }
 }
